// pages/usercenter/components/copy-btn/index.js
Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    value:{
      type:String,
      value:""
    }
  },
  methods: {
    onClick(e) {
      wx.setClipboardData({
        data: this.properties.value,
        success: function (res) {
          wx.getClipboardData({
            success: function (res) {
              wx.showToast({
                title: '复制成功'
              })
            }
          })
        }
      });
    }
  }
})
